import App from './App'

import messages from './locale/index.js'
let i18nConfig = {
  locale: uni.getLocale(),
  messages
}



// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'

import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)



import colorConfig from "common/colorIndexConfig.js"
Vue.prototype.$colorConfig = colorConfig

import uView from 'uview-ui';
Vue.use(uView);

import deviceInfoTools from 'common/deviceInfoTools.js'
Vue.prototype.$deviceInfoTools = deviceInfoTools

import sqlDBObject from 'common/localDatabaseOpe.js'
Vue.prototype.$sqlDBConfig = sqlDBObject



// 全局配置网络请求
import request from './common/request/request.js'
import api from './api/api.js'
import http_url from './common/request/config.js'

Vue.config.productionTip = false
Vue.prototype.$request = request
Vue.prototype.$api = api
Vue.prototype.$http_url = http_url

// import http_url from './common/js/app_base_config.js'
import globalData from '@/common/js/app_base_config.js'
Vue.prototype.$globalData = globalData.globalData



import verCheckTools from 'components/versionCheckTool/versionCheckTool.vue'
Vue.component('ver-check-tools',verCheckTools)

const app = new Vue({
	i18n,
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createI18n } from 'vue-i18n'
const i18n = createI18n(i18nConfig)
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  app.use(i18n)
  return {
    app
  }
}
// #endif